import request from '@/utils/request'

// 查询租赁合同列表
export function listLeaseContract(query) {
  return request({
    url: '/lease/leaseContract/list',
    method: 'get',
    params: query
  })
}

// 查询租赁合同详细
export function getLeaseContract(id) {
  return request({
    url: '/lease/leaseContract/' + id,
    method: 'get'
  })
}

// 新增租赁合同
export function addLeaseContract(data) {
  return request({
    url: '/lease/leaseContract',
    method: 'post',
    data: data
  })
}

// 修改租赁合同
export function updateLeaseContract(data) {
  return request({
    url: '/lease/leaseContract',
    method: 'put',
    data: data
  })
}

// 删除租赁合同
export function delLeaseContract(id) {
  return request({
    url: '/lease/leaseContract/' + id,
    method: 'delete'
  })
}

// 导出租赁合同
export function exportLeaseContract(query) {
  return request({
    url: '/lease/leaseContract/export',
    method: 'get',
    params: query
  })
}


export function appleLease(query) {
  return request({
    url: '/lease/leaseContract/appleLease',
    method: 'get',
    params: query
  })
}


export function expriyLease(data) {
  return request({
    url: '/lease/leaseContract/expriyLease',
    method: 'put',
    data: data
  })
}


export function beforeRecord(data) {
  return request({
    url: '/lease/leaseContract/beforeRecord',
    method: 'put',
    data: data
  })
}
